﻿@using NOSDC.Services.Extensions;

@model NOSDC.Models.FrontPageViewModel

@section Title{
    @Html.CreatePageTitle("Home")
}

@section MetaTags{
    @Html.CreateMetaDescription("Welcome to the Northern Ontario Software Developer Community.")
}

@section Right{
    @{Html.RenderAction("GetUpcomingEvent", "Events");}
    @{Html.RenderAction("RecentJobs", "Jobs");}
}

@foreach(var item in Model.Article){
 <div class="news">
    <div class="newsPosting">
        <div>
            <div class="leftIcon">
            </div>
            <div class="titleWrapper">
                <div class="newsTitle">@Html.ActionLink(item.Title, "FullArticle", "Article", new { item.ArticleID,  Title = item.Title.ToSeoUrl() }, null) </div>
                <div class="newsDate"> @item.DatePosted.ToString("MMMM d, yyyy")</div>
            </div>
        </div>
        <div class="rightIcon">
        </div>
    </div>
    <div class="newsBody">
        @Html.Raw(item.Story)
    </div>
    <div style="padding-top:10px;">
        <div style="float:left; width:300px;"><img src="@Url.Content("~/Images/comment.gif")" alt="" style="vertical-align:middle;" /> <strong>@item.Comments.Count()</strong> @Html.ActionLink("Comments", "FullArticle", "Article", new { item.ArticleID, Title = item.Title.ToSeoUrl() }, new {Class = "frontPageComment" }) </div>
        <div class="postedBy">
            Posted By: <a href="../Account/Register">@Membership.GetUser(item.PostedBy).UserName</a>
        </div>
    </div>
</div>
}

    @section JavaScript{
    <script type="text/javascript">
        $("#Home").addClass("selected");
    </script>
}